package com.guijq.codesegment.java8.stream;

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;

/**
 * @Author timyag
 * @Date 2021/5/17 14:28
 * @Version 1.0
 */
public class StreamTest {

    public static void main(String[] args) {
        List<String> list = Arrays.asList("a", "b");
//        list.stream();
        List<Integer> numList = Arrays.asList(1,2,3,4,5);
        int result = numList.stream().reduce((a,b) -> a + b ).get();
        System.out.println(result);
    }


}
